
/**
 * 按顺序调用方法
 * @param {*} funcs 方法队列
 */
const callSequenceFn: Function = (funcs: any) => {
    if (!funcs[0]) {return;}

    return funcs[0](callSequenceFn.bind(()=>{}, funcs.splice(1)));
};

export const callSequence = callSequenceFn;